]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
telepathyClient: Re-open existing chat sources on Shell restart
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 28 Feb 2011 18:14:07 +0000 (13:14 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 14 Mar 2011 22:42:55 +0000 (18:42 -0400)
This allows users to continue a chat they were having after
the shell is restarted.

https://bugzilla.gnome.org/show_bug.cgi?id=642793

js/ui/telepathyClient.js

index 7dd972e7ae07dad80d66c5581aeb8b7d54bf62e1..7bfc7ace176f8ecd250a99280fff0e146bc0de18 100644 (file)
@@ -143,6 +143,10 @@ Source.prototype = {
         this._notifyAvatarId = this._contact.connect('notify::avatar-file', Lang.bind(this, this._updateAvatarIcon));
         this._presenceChangedId = this._contact.connect('presence-changed', Lang.bind(this, this._presenceChanged));
 
+        // Add ourselves as a source.
+        Main.messageTray.add(this);
+        this.pushNotification(this._notification);
+
         this._displayPendingMessages();
     },
 
@@ -216,9 +220,6 @@ Source.prototype = {
     },
 
     notify: function() {
-        if (!Main.messageTray.contains(this))
-            Main.messageTray.add(this);
-
         MessageTray.Source.prototype.notify.call(this, this._notification);
     },